﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HITs
{
    class ItemListbox
    {
        public string title;
        public float heso;
        public int id;

        public ItemListbox(string name, float f)
        {
            heso = f;
            title = name;
        }

        public ItemListbox(int _id, float f)
        {
            id = _id;
            heso = f;
        }

        public static int Compare_float(ItemListbox a, ItemListbox b)
        {
            if (a.heso > b.heso)
                return -1;
            else
                if (a.heso == b.heso)
                    return 0;
                else
                    if (a.heso < b.heso)
                        return 1;
            return 0;
        }

        public static int Compare_name(ItemListbox a, ItemListbox b)
        {
            int k = a.title.CompareTo(b.title);
            if (k == 1)
                return -1;
            else
                if (k == 0)
                    return 0;
                else
                    if (k == -1)
                        return 1;
            return 0;
        }
    }
}
